package org.example.study.sc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.example.study.sc.entity.GoodsStock;

import java.util.List;

/**
 * @program: rabbitmq-study
 * @description:
 * @Version V1.0.0
 * @author: dazhi
 * @create: 2021-01-28 11:48
 **/
public interface GoodsStockMapper extends BaseMapper<GoodsStock> {
    List<GoodsStock> findStockForUpdate(@Param("itemIds") List<Long> itemIds);

    int updateStock(GoodsStock stock);

    GoodsStock getByIdForUpdate(@Param("goodsId") Long goodsId);
}
